package com.yizisu.playerlibrary.view.video_view.view

import android.content.Context
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatImageView
import com.yizisu.playerlibrary.view.video_view.helper.IPlayerConfig
import com.yizisu.playerlibrary.view.video_view.helper.IPlayerHelper


/**
 * 当前视频标题文本
 */
open class PlayerBackView : AppCompatImageView, IPlayerHelper {

    constructor(context: Context) : super(context)
    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
        context,
        attrs,
        defStyleAttr
    )

    override fun onAttachPlayerConfig(playerConfig: IPlayerConfig) {
        this.setOnClickListener {
            playerConfig.updateClickBack(this)
        }
    }

    override fun onDetachedPlayerConfig(playerConfig: IPlayerConfig) {
    }


}